package com.aduerr.v1shouyin.mvp.fragment;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import com.aduerr.v1shouyin.R;
import com.orhanobut.hawk.Hawk;
import org.greenrobot.eventbus.EventBus;

/**
 * description：
 * author：Marco
 * creatTime：2018/9/25
 * version：1
 */
public class CancelTFragment extends Fragment {


    public static CancelTFragment cancelTFragment;
    Button mButtonCancel;

    public static final CancelTFragment newInstance(String sid) {
        if(cancelTFragment == null) {
            cancelTFragment = new CancelTFragment();
        }
        return cancelTFragment;
    }

    @Override
    public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        mButtonCancel.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Hawk.put("hexiaopop", true);
                EventBus.getDefault().post("dismiss");
            }
        });

    }

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
                             @Nullable Bundle savedInstanceState) {
        View mView = inflater.inflate(R.layout.fragment_t, null);
        mButtonCancel = (Button) mView.findViewById(R.id.btn_cancel);
        return mView;
    }

}
